---行为
---@class Battle.AiActionType
local AiActionType = Battle.CreateClass("AiActionType")
Battle.AiActionType = AiActionType
function AiActionType:ctor(id,clazz)
    self.id = id
    self.clazz = clazz
end
AiActionType.Wait = AiActionType.New(1,Battle.AiWaitAction)
AiActionType.DoSkill= AiActionType.New(2,Battle.AiDoSkillAction)
AiActionType.TriggerSet = AiActionType.New(3,Battle.AiTriggerSetAction)
AiActionType.PathFinding = AiActionType.New(5,Battle.AiPathFindingAction)
AiActionType.SetSearchTarget = AiActionType.New(6,Battle.AiSetSearchTargetAction)
AiActionType.AddEffectState = AiActionType.New(7,Battle.AiAddEffectState)
AiActionType.RemoveEffectState = AiActionType.New(8,Battle.AiRemoveEffectState)
AiActionType.EnterHitAction = AiActionType.New(9,Battle.AiEnterHitAction)
AiActionType.EnterStunAction = AiActionType.New(10,Battle.AiEnterStunAction)

---条件
---@class Battle.AiConditionType
local AiConditionType = Battle.CreateClass("AiConditionType")
Battle.AiConditionType = AiConditionType
function AiConditionType:ctor(id,clazz)
    self.id = id
    self.clazz = clazz
end
AiConditionType.DefaultCondition = AiConditionType.New(1,Battle.AiCondition)
AiConditionType.Trigger = AiConditionType.New(2,Battle.AiTriggerCondition)
AiConditionType.Dead = AiConditionType.New(3,Battle.AiDeadCondition)
AiConditionType.HasTarget = AiConditionType.New(4,Battle.AiHasTargetCondition)
AiConditionType.InSkillRange = AiConditionType.New(5,Battle.AiInSkillRangeCondition)
AiConditionType.CheckTargetChange = AiConditionType.New(6,Battle.AiCheckTargetChangeCondition)
AiConditionType.CanMove = AiConditionType.New(7,Battle.AiCanMoveCondition)
AiConditionType.CanPathFinding = AiConditionType.New(8,Battle.AiCanPathFindingCondition)
AiConditionType.CanUseSkill = AiConditionType.New(9,Battle.AiCanUseSkill)

---装饰器
---@class Battle.AiDecoratorType
local AiDecoratorType = Battle.CreateClass("AiDecoratorType")
Battle.AiDecoratorType = AiDecoratorType
function AiDecoratorType:ctor(id,clazz)
    self.id = id
    self.clazz = clazz
end
AiDecoratorType.Repeater = AiDecoratorType.New(1,Battle.AiRepeater)

---ai
---@class Battle.AiType
local AiType = Battle.CreateClass("AiType")
Battle.AiType = AiType
function AiType:ctor(id,clazz)
    self.id = id
    self.clazz = clazz
end
AiType.CommonAi = AiType.New(1,Battle.CommonAi)
AiType.LordAi = AiType.New(2,Battle.LordAi)
AiType.EnemyLordAi = AiType.New(3,Battle.EnemyLordAi)

Battle.AiTreeStatus = {
    INVALID = 0,
    SUCCESS = 1,
    FAILURE = 2,
    RUNNING = 3,
    ABORTED = 4,
}
Battle.CompareType = {
    Equals = 1,
    Greater = 2,
    Less = 3,
    GreaterEquals = 4,
    LessEquals = 5,
    NotEquals = 6
}
Battle.BehaviorType = {
    Action = 1,
    Composite = 2,
    Condition = 3,
    Decorator = 4,
}